package cn.hwl.springframework.beans.factory.config;

import cn.hwl.springframework.beans.PropertyValue;
import cn.hwl.springframework.beans.PropertyValues;

import java.util.concurrent.ConcurrentHashMap;

/**
 * @author :  HuangWL
 * @date :    2022/4/22 15:19
 */
public class BeanDefinition {
    /**
     *  2. 将Object 替换 Class，Bean 的实例化操作放到容器中处理
     *  ：Bean 的实例化操作放在初始化调用阶段传递给 BeanDefinition 构造函数的
     */
    private Class beanClass;

    private PropertyValues propertyValues;

    public BeanDefinition(Class beanClass){
        this.beanClass = beanClass;
        this.propertyValues = new PropertyValues();
    }

    public BeanDefinition(Class beanClass, PropertyValues propertyValues) {
        this.beanClass = beanClass;
        this.propertyValues = propertyValues != null ? propertyValues : new PropertyValues();
    }

    public Class getBeanClass() {
        return beanClass;
    }

    public void setBeanClass(Class beanClass) {
        this.beanClass = beanClass;
    }

    public PropertyValues getPropertyValues() {
        return propertyValues;
    }

    public void setPropertyValues(PropertyValues propertyValues) {
        this.propertyValues = propertyValues;
    }


}
